package com.atguigu.spring.processor.factory;

import org.springframework.beans.BeansException;
import org.springframework.beans.factory.config.BeanFactoryPostProcessor;
import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;
import org.springframework.core.Ordered;
import org.springframework.stereotype.Component;

/**
 * BeanFactory的后置处理器
 */
@Component
public class MyBeanFactoryPostProcessorOrdered implements BeanFactoryPostProcessor, Ordered {
	public MyBeanFactoryPostProcessorOrdered() {
		System.out.println("MyBeanFactoryPostProcessor1...");
	}

	@Override
	public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) throws BeansException {
		System.out.println("BeanFactoryPostProcessor1....postProcessBeanFactory==>" + beanFactory);
	}

	@Override
	public int getOrder() {
		return 0;
	}
}
